<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FreeRTOS Addons: cpp_freertos::EventGroup Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FreeRTOS Addons
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecpp__freertos.html">cpp_freertos</a></li><li class="navelem"><a class="el" href="classcpp__freertos_1_1_event_group.html">EventGroup</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classcpp__freertos_1_1_event_group-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">cpp_freertos::EventGroup Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="event__groups_8hpp_source.html">event_groups.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8d5e797dbd7a2f10435198ae964511aa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a8d5e797dbd7a2f10435198ae964511aa">EventGroup</a> ()</td></tr>
<tr class="separator:a8d5e797dbd7a2f10435198ae964511aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f42da7f0852ae5038ffc1bf2c072f06"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a7f42da7f0852ae5038ffc1bf2c072f06">EventGroup</a> (StaticEventGroup_t *pxEventGroupBuffer)</td></tr>
<tr class="separator:a7f42da7f0852ae5038ffc1bf2c072f06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec45fca847056b3ea8b62899c5903f55"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#aec45fca847056b3ea8b62899c5903f55">~EventGroup</a> ()</td></tr>
<tr class="separator:aec45fca847056b3ea8b62899c5903f55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c35a6122fa07ca5da1f10656248dd5f"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a7c35a6122fa07ca5da1f10656248dd5f">ClearBits</a> (const EventBits_t uxBitsToClear)</td></tr>
<tr class="separator:a7c35a6122fa07ca5da1f10656248dd5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf4b70273f295c118d0ee878c6ba6a93"><td class="memItemLeft" align="right" valign="top">BaseType_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#abf4b70273f295c118d0ee878c6ba6a93">ClearBitsFromISR</a> (const EventBits_t uxBitsToClear)</td></tr>
<tr class="separator:abf4b70273f295c118d0ee878c6ba6a93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a077779e0d377357eac0369b38b60454a"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a077779e0d377357eac0369b38b60454a">GetBits</a> ()</td></tr>
<tr class="separator:a077779e0d377357eac0369b38b60454a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06cbcf19e4210c4f15058f42f3ee6387"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a06cbcf19e4210c4f15058f42f3ee6387">GetBitsFromISR</a> ()</td></tr>
<tr class="separator:a06cbcf19e4210c4f15058f42f3ee6387"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72f524b57d52b1f311d750ab260cdd05"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a72f524b57d52b1f311d750ab260cdd05">SetBits</a> (const EventBits_t uxBitsToSet)</td></tr>
<tr class="separator:a72f524b57d52b1f311d750ab260cdd05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5df2e5c90078e9268aa16454c62042"><td class="memItemLeft" align="right" valign="top">BaseType_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#acb5df2e5c90078e9268aa16454c62042">SetBitsFromISR</a> (const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken)</td></tr>
<tr class="separator:acb5df2e5c90078e9268aa16454c62042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b7f5f1f4ce5af448f58c039e1bda551"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#a3b7f5f1f4ce5af448f58c039e1bda551">Sync</a> (const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait)</td></tr>
<tr class="separator:a3b7f5f1f4ce5af448f58c039e1bda551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae646467645dddbec16d4a2a51ffff7a0"><td class="memItemLeft" align="right" valign="top">EventBits_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">WaitBits</a> (const EventBits_t uxBitsToWaitFor, bool xClearOnExit, bool xWaitForAllBits, TickType_t xTicksToWait)</td></tr>
<tr class="separator:ae646467645dddbec16d4a2a51ffff7a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae4a8e10d12038a774a4facdec1e328da"><td class="memItemLeft" align="right" valign="top">EventGroupHandle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_event_group.html#ae4a8e10d12038a774a4facdec1e328da">handle</a></td></tr>
<tr class="separator:ae4a8e10d12038a774a4facdec1e328da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd><ul>
<li>document this class </li>
</ul>
</dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a8d5e797dbd7a2f10435198ae964511aa" name="a8d5e797dbd7a2f10435198ae964511aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d5e797dbd7a2f10435198ae964511aa">&#9670;&#160;</a></span>EventGroup() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventGroup::EventGroup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Construct a Event Group </p>

</div>
</div>
<a id="a7f42da7f0852ae5038ffc1bf2c072f06" name="a7f42da7f0852ae5038ffc1bf2c072f06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f42da7f0852ae5038ffc1bf2c072f06">&#9670;&#160;</a></span>EventGroup() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventGroup::EventGroup </td>
          <td>(</td>
          <td class="paramtype">StaticEventGroup_t *&#160;</td>
          <td class="paramname"><em>pxEventGroupBuffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Construct a Event Group with static allocation </p>

</div>
</div>
<a id="aec45fca847056b3ea8b62899c5903f55" name="aec45fca847056b3ea8b62899c5903f55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec45fca847056b3ea8b62899c5903f55">&#9670;&#160;</a></span>~EventGroup()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">EventGroup::~EventGroup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Our destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7c35a6122fa07ca5da1f10656248dd5f" name="a7c35a6122fa07ca5da1f10656248dd5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c35a6122fa07ca5da1f10656248dd5f">&#9670;&#160;</a></span>ClearBits()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::ClearBits </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToClear</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Clear bits (flags) within an event group.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToClear</td><td>A bitwise value that indicates the bit or bits to clear in the event group.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the event group before the specified bits were cleared. </dd></dl>

</div>
</div>
<a id="abf4b70273f295c118d0ee878c6ba6a93" name="abf4b70273f295c118d0ee878c6ba6a93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf4b70273f295c118d0ee878c6ba6a93">&#9670;&#160;</a></span>ClearBitsFromISR()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BaseType_t EventGroup::ClearBitsFromISR </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToClear</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Clear bits (flags) within an event group from ISR context.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToClear</td><td>A bitwise value that indicates the bit or bits to clear in the event group.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the event group before the specified bits were cleared. </dd></dl>

</div>
</div>
<a id="a077779e0d377357eac0369b38b60454a" name="a077779e0d377357eac0369b38b60454a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a077779e0d377357eac0369b38b60454a">&#9670;&#160;</a></span>GetBits()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::GetBits </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Returns the current value of the event bits (event flags) in an event group.</p>
<dl class="section return"><dt>Returns</dt><dd>The value of the event bits in the event group at the time <a class="el" href="classcpp__freertos_1_1_event_group.html#a06cbcf19e4210c4f15058f42f3ee6387">EventGroup::GetBitsFromISR</a> was called. </dd></dl>

</div>
</div>
<a id="a06cbcf19e4210c4f15058f42f3ee6387" name="a06cbcf19e4210c4f15058f42f3ee6387"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06cbcf19e4210c4f15058f42f3ee6387">&#9670;&#160;</a></span>GetBitsFromISR()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::GetBitsFromISR </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Returns the current value of the event bits (event flags) in an event group from ISR context.</p>
<dl class="section return"><dt>Returns</dt><dd>The value of the event bits in the event group at the time <a class="el" href="classcpp__freertos_1_1_event_group.html#a06cbcf19e4210c4f15058f42f3ee6387">EventGroup::GetBitsFromISR</a> was called. </dd></dl>

</div>
</div>
<a id="a72f524b57d52b1f311d750ab260cdd05" name="a72f524b57d52b1f311d750ab260cdd05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72f524b57d52b1f311d750ab260cdd05">&#9670;&#160;</a></span>SetBits()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::SetBits </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToSet</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Set bits (flags) within an event group.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToSet</td><td>A bitwise value that indicates the bit or bits to set in the event group.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the event group at the time the call to <a class="el" href="classcpp__freertos_1_1_event_group.html#a72f524b57d52b1f311d750ab260cdd05">EventGroup::SetBits</a> returns </dd></dl>

</div>
</div>
<a id="acb5df2e5c90078e9268aa16454c62042" name="acb5df2e5c90078e9268aa16454c62042"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb5df2e5c90078e9268aa16454c62042">&#9670;&#160;</a></span>SetBitsFromISR()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BaseType_t EventGroup::SetBitsFromISR </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToSet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BaseType_t *&#160;</td>
          <td class="paramname"><em>pxHigherPriorityTaskWoken</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Set bits (flags) within an event group from ISR context.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToSet</td><td>A bitwise value that indicates the bit or bits to set in the event group.</td></tr>
    <tr><td class="paramname">pxHigherPriorityTaskWoken</td><td>A bitwise value that indicates the bit or bits to set in the event group.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Calling this function will result in a message being sent to the RTOS daemon task. If the priority of the daemon task is higher than the priority of the currently running task (the task the interrupt interrupted) then *pxHigherPriorityTaskWoken will be set to true by EventGroupSetBitsFromISR, indicating that a context switch should be requested before the interrupt exits. For that reason *pxHigherPriorityTaskWoken must be initialised to false. </dd></dl>

</div>
</div>
<a id="a3b7f5f1f4ce5af448f58c039e1bda551" name="a3b7f5f1f4ce5af448f58c039e1bda551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b7f5f1f4ce5af448f58c039e1bda551">&#9670;&#160;</a></span>Sync()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::Sync </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToSet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToWaitFor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TickType_t&#160;</td>
          <td class="paramname"><em>xTicksToWait</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Allow two or more tasks to use an event group to sync each other.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToSet</td><td>A bit mask that specifies the event bit, or event bits, to set 1 in the event group. The value of the event groups is updated by bitwise ORing the event group's existing value with the passed in uxBitsToSet.</td></tr>
    <tr><td class="paramname">uxBitsToWaitFor</td><td>The bit or bits to set in the event group before determining if (and possibly waiting for), all the bits specified by the uxBitsToWait parameter are set.</td></tr>
    <tr><td class="paramname">xTicksToWait</td><td>The maximum amount of time (specified in 'ticks') to wait for all the bits specified by the uxBitsToWaitFor parameter value to become set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If <a class="el" href="classcpp__freertos_1_1_event_group.html#a3b7f5f1f4ce5af448f58c039e1bda551">EventGroup::Sync</a> returned because all the bits it was waiting for were set then the returned value is the event group value before any bits were automatically cleared. If <a class="el" href="classcpp__freertos_1_1_event_group.html#a3b7f5f1f4ce5af448f58c039e1bda551">EventGroup::Sync</a> returned because its timeout expired then not all the bits being waited for will be set. </dd></dl>

</div>
</div>
<a id="ae646467645dddbec16d4a2a51ffff7a0" name="ae646467645dddbec16d4a2a51ffff7a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae646467645dddbec16d4a2a51ffff7a0">&#9670;&#160;</a></span>WaitBits()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventBits_t EventGroup::WaitBits </td>
          <td>(</td>
          <td class="paramtype">const EventBits_t&#160;</td>
          <td class="paramname"><em>uxBitsToWaitFor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>xClearOnExit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>xWaitForAllBits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TickType_t&#160;</td>
          <td class="paramname"><em>xTicksToWait</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Read bits within an RTOS event group, optionally entering the Blocked state (with a timeout) to wait for a bit or group of bits to become set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uxBitsToWaitFor</td><td>A bitwise value that indicates the bit or bits to test inside the event group.</td></tr>
    <tr><td class="paramname">xClearOnExit</td><td>If xClearOnExit is set to true then any bits set in the value passed as the uxBitsToWaitFor parameter will be cleared in the event group before <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> returns if <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> returns for any reason other than a timeout. The timeout value is set by the xTicksToWait parameter. If xClearOnExit is set to false then the bits set in the event group are not altered when the call to <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> returns.</td></tr>
    <tr><td class="paramname">xWaitForAllBits</td><td>is used to create either a logical AND test (where all bits must be set) or a logical OR test (where one or more bits must be set) as follows: <pre class="fragment">@par    If xWaitForAllBits is set to true then
        EventGroup::WaitBits will return when either all the
        bits set in the value passed as the uxBitsToWaitFor
        parameter are set in the event group or the specified
        block time expires.

@par   If xWaitForAllBits is set to false then
        EventGroup::WaitBits will return when any of the bits
        set in the value passed as the uxBitsToWaitFor
        parameter are set in the event group or the specified
        block time expires.
</pre> </td></tr>
    <tr><td class="paramname">xTicksToWait</td><td>The maximum amount of time (specified in 'ticks') to wait for one/all (depending on the xWaitForAllBits value) of the bits specified by uxBitsToWaitFor to become set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the event group at the time either the event bits being waited for became set, or the block time expired. The current value of the event bits in an event group will be different to the returned value if a higher priority task or interrupt changed the value of an event bit between the calling task leaving the Blocked state and exiting the <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> function. Test the return value to know which bits were set. If <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> returned because its timeout expired then not all the bits being waited for will be set. If <a class="el" href="classcpp__freertos_1_1_event_group.html#ae646467645dddbec16d4a2a51ffff7a0">EventGroup::WaitBits</a> returned because the bits it was waiting for were set then the returned value is the event group value before any bits were automatically cleared because the xClearOnExit parameter was set to true. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ae4a8e10d12038a774a4facdec1e328da" name="ae4a8e10d12038a774a4facdec1e328da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4a8e10d12038a774a4facdec1e328da">&#9670;&#160;</a></span>handle</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">EventGroupHandle_t cpp_freertos::EventGroup::handle</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >FreeRTOS Event Group handle. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="event__groups_8hpp_source.html">event_groups.hpp</a></li>
<li>src/freertos-addon/c++/cevent_groups.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
